{% extends 'TopxiaWebBundle:Group:setting-layout.html.twig' %}

{% set script_controller = 'group/group_logo' %}

{% block title %}{{groupinfo.title}}{{'小组'|trans}} - {{ parent() }}{% endblock %}

{% set settingNav = 'background' %}

{% block group_setting_body %}

<form id="group-avatar-form" class="form-horizontal" method="post" enctype="multipart/form-data" action="">

  <div class="form-group">
    <label class="col-md-2 control-label">{{'当前背景'|trans}}</label>
    <div class="controls col-md-8">
      <img class="img-responsive" src="{{filepath(logo, 'background_group.jpg')}}" >
    </div>
  </div>

  <div class="form-group">
    <label class="col-md-2 control-label" for="form_avatar"></label>
    <div class="controls col-md-8">
      {{'<p class="help-block">你可以上传JPG、GIF或PNG格式的文件，文件大小不能超过<strong>2M</strong>。推荐大小（1140*150）</p>'|trans|raw}}
    </div>
  </div>

  <div class="form-group">
    <div class="controls col-md-8 col-md-offset-2">
      <a id="group-save-btn"
      data-upload-token="{{ upload_token('tmp', 'image') }}"
      data-goto-url="{{path('group_setLogoCrop', {id: id, page:'backGroundLogoCrop'})}}"
      data-submiting-text="{{'正在上传'|trans}}" class="btn btn-primary">{{'上传新背景'|trans}}</a>
    </div>
  </div>

</form>

{% endblock %}